package com.foreknow.demo2;

public class Information {
    public static void main(String[] args) {
        //姓名
        String name = "tom";
        //性别
        char sex = '男';
        //年龄
        int age = 20;
        //所在学校
        String school = "foreknow";
        //爱好
        String hib = "music";
        //婚否
        boolean isMarry = false;
        //成绩
        double score = 87.80;
        //薪水
        double salary = 3456.78;

        //注意: 任何基本数据类型与字符串连接(+)最终的类型都是字符串类型 String aa = name（字符串） + age(整型);
        String aa = name + age;
        System.out.println(aa);
        String newStr = "姓名: " + name + " 性别: " + sex + " 年龄:" + age;
        System.out.println(newStr);

//         int newDouble = age + score;
        System.out.println("----" + (age + score));
    }
}
